﻿Imports extranet.BE
Imports extranet.DA
Imports extranet.BC

Partial Class exibirImagem
  Inherits System.Web.UI.Page

  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    ExibirImagem()
  End Sub

  Private Sub ExibirImagem()
    Dim objImagem() As Byte = BCNoticia.SelecionarImagem(Request.QueryString("noticiaId"))
    'Dim noticia As Noticia
    'Dim noticiaDao As NoticiaDAO
    'noticia = New Noticia()
    'noticiaDao = New NoticiaDAO()
    'noticia.Id = Integer.Parse(Request.QueryString("noticiaId"))
    'noticia = noticiaDao.selecionar(noticia)
    Response.ContentType = "image/jpg"
    If objImagem IsNot Nothing Then
      Response.OutputStream.Write(objImagem, 0, objImagem.Length)
    End If
    Response.End()
  End Sub

End Class
